<template>
  <span>用户账户：</span>
  <el-input v-model="username" style="width: 240px" placeholder="请输入账户" />
  <br />
  <span>用户密码：</span>
  <el-input v-model="password" style="width: 240px" :rows="2" type="textarea" placeholder="请输入密码" />
  <br />
  <el-switch v-model="disabled" inactive-text="是否禁用" />
  <br />
  <el-button type="primary" @click="fabu2">确认</el-button>
  <el-button type="danger" @click="reset2">取消</el-button>
</template>
<script setup lang="ts">
import { YonghuAddRequset } from '@/api/user';
import { ref } from 'vue';
const username = ref('');
const password = ref("");
const disabled = ref(false);
async function fabu2() {
  const res = await YonghuAddRequset(username.value, password.value, disabled.value)
  console.log(res);

}
function reset2() {
  username.value = '';
  password.value = '';
}
</script>
<style lang="css" scoped></style>
